﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using UncleBobWebService.Database;
using UncleBobWebService.Models;
using UncleBobWebService.ServiceRequester;


namespace UncleBobWebService
{
    class UncleBobStaffService : IWebService
    {
        //----------------------------------------------
        //----------------------------------------------
        //private IDBAdapter dbJobAdapter = new JobDBAdapter(new QuestionDBAdapter(new AnswerDBAdapter()));


        //***********************************************
        //***********************************************
        public Message RequestService(Message msg)
        {
            string action = msg.Category;
            IDBAdapter dbJobAdapter = null; 
            switch (action)
            {
                //case MessageTypes.SERVICE_REGISTER_DATA:
                //    msg = dbJobAdapter.CreateData(msg, null);
                //    break;

                //case MessageTypes.SERVICE_SEARCH_SPECIFIC_DATA:
                //    msg = dbJobAdapter.SearchForSpecificData(msg, null);
                //    break;

                //case MessageTypes.SERVICE_SEARCH_ALL_DATA:
                //    msg = dbJobAdapter.SearchForAllData(msg);
                //    break;

                //case MessageTypes.SERVICE_EDIT_DATA:
                //    msg = dbJobAdapter.EditSpecificData(msg, null);
                //    break;

                //case MessageTypes.SERVICE_DELETE_SPECIFIC_DATA:
                //    msg = dbJobAdapter.DeleteSpecificData(msg, null);
                //    break;

                //case MessageTypes.SERVICE_DELETE_ALL_DATA:
                //    msg = dbJobAdapter.DeleteAllData(msg);
                //    break;
            }

            return msg;
        }       
    }
}
